package com.boot.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * @author
 * @date 2025-07-28
 * @Description
 */
// 目前我们项目引入了spring-web  模块 这个注解针对针对于web启动器有效。
@EnableAutoConfiguration
public class UpConfig {
    // 测试通过配置复制到属性
    @Value("${server.port}")
    private int port;
    @Value("${my.name}")
    private String name;
    @Value("${age}")
    private int age;

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
